<template>
	<view class="body" >
		
		<u-gap height="5" bg-color="#fafafa"></u-gap>
		<!-- v-for="(item,index) in list" :key="index" -->
		<view class="store" >
			<view class="store-name" >SWA旗舰店</view>
			<view class="goods" >
				<view class="goods-img" >
					<image src="https://cdn.uviewui.com/uview/swiper/1.jpg" mode="aspectFill" ></image>
				</view>
				<view class="goods-detail" >
					<view>MCM Patricia Visetos</view>
					<view class="text1" >100ml</view>
					<view  >
						<text>¥299.90</text> 
						<text class="text2" >¥1</text>
					</view>
				</view>
			</view>
			<view  class="goods-item">
				<view class="item-label" >买家留言（选填）</view>
				<view>
					<input class="item-input" placeholder="请与卖家协调一致" />
				</view>
			</view>
			<view  class="goods-item">
				<view class="item-label" >商品金额</view>
				<view>¥23.89</view>
			</view>
			<view  class="goods-item">
				<view class="item-label" >余额（100元）</view>
				<u-checkbox-group  @change="checkboxChange"  >
					<u-checkbox v-model="checked" shape="circle"></u-checkbox>
				</u-checkbox-group>
			</view>
		</view>
		
		<!-- 占位开始 -->
		<view style="height: 50px;" ></view>
		<!-- 占位结束 -->
		
		<view class="bottom-view" >
			<view class="bottom-text" >合计金额：¥455.90</view>
			<view class="bottom-btn" @click="submitOrder" >提交订单</view>
		</view>
		
	</view>
</template>

<script>
	export default{
		data(){
			return{
				list: [1,2],
				checked: false
			}
		},
		methods:{
			checkboxGroupChange(e){
				console.log('组件选中',e)
			},
			checkboxChange(e){
				console.log('单个选中',e)
			},
			submitOrder(){  //提交订单
				uni.navigateTo({
					url: "./paySuccess"
				})
			}
		}
	}
	
</script>

<style lang="scss" >
	
	page,.body{
		
		width: 100%;
		height: 100%;
		
		background-color: rgb(250,250,250);
	}
	
	.store{
		
		margin: 20rpx 0;
		padding: 20rpx;
		background-color: #FFFFFF;
		.store-name{
			
			padding: 14rpx 20rpx;
			
			border-bottom: 1rpx solid rgb(245,245,245);
		}
		
		.goods{
			
			display: flex;
			padding: 20rpx 20rpx 20rpx 20rpx;
			
			border-bottom: 1rpx solid rgb(245,245,245);
			
			.goods-img{
				width: 120rpx;
				height: 120rpx;
				border-radius: 10rpx;
				
				image{
					width: 100%;
					height: 100%;
				}
			}
			
			.goods-detail{
				margin: 0 20rpx;
				
				.text1{
					color: #666;
				}
				.text2{
					padding: 0 26rpx;
					color: #ccc;
				}
			}
		}
		
		.goods-item{
			display: flex;
			align-items: center;
			justify-content: space-between;
			
			border-bottom: 1rpx solid rgb(245,245,245);
			
			padding: 20rpx;
			
			font-size: $uni-font-size-base;
			
			.item-label{
				color: #999;
			}
			
			.item-input{
				text-align: right;
			}
		}
	}
	
	.bottom-view{
		
		position: fixed;
		bottom: 0;
		z-index: 10;
		width: 100%;
		
		display: flex;
		align-items: center;
		justify-content: space-between;
		
		padding: 20rpx 40rpx;
		
		background-color: #FFFFFF;
		
		.bottom-text{
			color: $uni-color-error;
		}
		
		.bottom-btn{
			
			padding: 0 30rpx;
			
			height: 60rpx;
			line-height: 60rpx;
			border-radius: 40rpx;
			
			background-color: $uni-color-error;
			color: #FFFFFF;
			font-size: $uni-font-size-sm;
		}
	}
	
</style>
